# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-marshmallow
pkgver=3.19.0
pkgrel=2
pkgdesc="A lightweight library for converting complex datatypes to and from native Python datatypes."
url="https://github.com/marshmallow-code/marshmallow"
license=('MIT')
arch=('any')
depends=('python-packaging')
makedepends=('python-setuptools')
checkdepends=('python-pytest-runner' 'python-simplejson' 'python-pytz' 'python-dateutil')
source=("https://pypi.io/packages/source/m/marshmallow/marshmallow-$pkgver.tar.gz")
sha512sums=('aa621949aaa2ec00538422461f3866c44304ee3bdf55b94d90f45c8c1dcbb542050e1f2ba459eff40d1588b94c15d6a07a1c9e759fbb21e2bffe2414bc2a7151')

build() {
  cd "$srcdir"/marshmallow-$pkgver
  python setup.py build
}

check() {
  cd "$srcdir"/marshmallow-$pkgver
  python setup.py pytest
}

package() {
  cd marshmallow-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
